Skip to main content

All Questions

0votes
2answers
291views

Services injected with factories

I face an issue where I want to inject Entity Frameworks DbContext into a service class, in a WPF application. The problem is that the service classes are instantiated and contained by the view models....
Jakob Busk Sørensen's user avatar
1vote
4answers
1kviews

Avoid type checking but preserve separation of concerns

I'm working on an MVVM project and trying to preserve separation of concerns. Our current architecture has an entity framework model and MVVM light view and viewmodel projects. I'm working ViewModel ...
Felix Castor's user avatar
1vote
0answers
922views

How to manage dbContext in a multi-user application?

I put together my first line-of-business app using WPF/MVVM/EF6(db-first)/MSSQL and realised that multiple users could not see each others' changes because I was using one dbcontext and keeping it ...
The Mean Fiddler's user avatar
5votes
1answer
12kviews

Mapping Domain models to ViewModel

I have an Asp.net MVC5 application structured like this: Core Domain project Infrastructure DAL project Utilities UI UI project (contains ViewModel at the moment, will probably put that into separate ...
Iztoksson's user avatar
2votes
2answers
564views

Is it improper to have an application wide source for dropdown binding

The WPF Combobox needs to bind a collection to it's ItemsSource and something to bind the selected item or value to. Until now, I've included both the collection and the selected value properties that ...
Chronicide's user avatar
6votes
1answer
10kviews

What's the best way to expose a Model object in a ViewModel?

In a WPF MVVM application, I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel. Instead of creating separate VM properties, I ...
Angel's user avatar
10votes
3answers
28kviews

What the best way to wire up Entity Framework database context (model) to ViewModel in MVVM WPF?

As in the question above: What the best way to wire up Entity Framework database model (context) to viewModel in MVVM (WPF)? I am learning MVVM pattern in WPF, alot of examples shows how to implement ...
hal9k2's user avatar
1vote
1answer
2kviews

Entity Framework and "ViewModel"

Earlier I asked a question about "Entity Framework and layer seperation" and found out that some people use a ViewModel to show their data in the UI. For example if we got a "Person" table and an "...
mRf's user avatar
  • 185
22votes
6answers
19kviews

Should we bind view to a model property or ViewModel should have it's own..?

I am starting a project with following technical environment : .Net 4.0, Entity Framework 4.0, WPF with MVVM Architecture I saw lots of examples on the net, some books with this environment. In some ...
Pravin Patil's user avatar

close